<HTML><HEAD><TITLE>set_suspension_priority(+Susp, +Priority)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Obsolete</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>set_suspension_priority(+Susp, +Priority)</H1>
Change the priority of the suspended goal Susp to Priority.


<DL>
<DT><EM>Susp</EM></DT>
<DD>A variable
</DD>
<DT><EM>Priority</EM></DT>
<DD>A small integer
</DD>
</DL>
<H3>This built-in predicate is obsolete!</H3>
<H2>Description</H2>
   Every suspended goal has an associated priority. The initial priority
   is specified when the suspension is created with make_suspension/3.
   The priority can be changed anytime, but when the suspension has
   already been scheduled for execution (by schedule_suspensions/2),
   the change has no effect on this already scheduled execution.

<P>
   Changing priorities is most useful for demons (where the same
   suspension is used for arbitrary many wakings) and where one might
   like to vary its urgency. Typically, the cheaper a goal is, and
   the more likely it is to fail or to produce useful information,
   the higher should it priority be. However, the relative priorities
   of other suspended goals must be kept in mind as well.

<P>
   Note that a suspension is not a standard Prolog data structure and can
   only be manipulated in a restricted way.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>set_suspension_priority(+, +) is det
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Susp or Priority are not instantiated.
<DT><EM>(5) type error </EM>
<DD>Susp is not a live suspension or Priority is not an integer.
<DT><EM>(6) out of range </EM>
<DD>Priority is not a valid priority.
</DL>
<H2>Examples</H2>
<PRE>



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/suspensions/set_suspension_data-3.html">set_suspension_data / 3</A>, <A HREF="../../kernel/compiler/demon-1.html">demon / 1</A>, <A HREF="../../kernel/typetest/is_suspension-1.html">is_suspension / 1</A>, <A HREF="../../kernel/suspensions/kill_suspension-1.html">kill_suspension / 1</A>, <A HREF="../../kernel/suspensions/make_suspension-3.html">make_suspension / 3</A>, <A HREF="../../kernel/suspensions/schedule_suspensions-2.html">schedule_suspensions / 2</A>, <A HREF="../../kernel/obsolete/suspension_to_goal-3.html">suspension_to_goal / 3</A>
</BODY></HTML>
